package com.binc.testspring.common.config;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import springfox.documentation.spring.web.SpringfoxWebMvcConfiguration;

/**
 * 这个配置类本来是配置swagger的，后来别的功能也要实现 WebMvcConfigurer 接口
 * 索性就合并了；  InterceptorConfig.java
 */

// @SpringBootApplication
// @ConditionalOnClass(SpringfoxWebMvcConfiguration.class)
public class WebMvcConfig_deprecated
        // implements WebMvcConfigurer     这个配置类与InterceptorConfig合并了
{

    // @Override
    // public void addResourceHandlers(ResourceHandlerRegistry registry) {
    //     /*
    //         bootstrap-ui 访问 http://localhost:8080/doc.html
    //         <!-- 引入swagger-bootstrap-ui包 /doc.html-->
    //         <dependency>
    //            <groupId>com.github.xiaoymin</groupId>
    //            <artifactId>swagger-bootstrap-ui</artifactId>
    //            <version>1.9.1</version>
    //         </dependency>
    //
    //      */
    //     registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
    //     /*
    //         Layui-ui 访问 http://localhost:8080/docs.html
    //         <!-- 引入swagger-ui-layer包 /docs.html-->
    //         <dependency>
    //            <groupId>com.github.caspar-chen</groupId>
    //            <artifactId>swagger-ui-layer</artifactId>
    //            <version>1.1.3</version>
    //         </dependency>
    //      */
    //     registry.addResourceHandler("docs.html").addResourceLocations("classpath:/META-INF/resources/");
    //     /*
    //          mg-ui 访问 http://localhost:8080/document.html
    //             <!-- 引入swagger-ui-layer包 /document.html-->
    //                 <dependency>
    //                    <groupId>com.zyplayer</groupId>
    //                    <artifactId>swagger-mg-ui</artifactId>
    //                    <version>1.0.6</version>
    //                 </dependency>
    //      */
    //     registry.addResourceHandler("document.html").addResourceLocations("classpath:/META-INF/resources/");
    //     registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
    // }
}